#!/bin/sh
cd ${0%/*} || exit 1    # Run from this directory

# Source tutorial run and clean functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions
. $WM_PROJECT_DIR/bin/tools/CleanFunctions

# Copy the source case
isTest "$@" && path=.. || path=$FOAM_TUTORIALS/incompressibleFluid
cp -r $path/pitzDailySteady .
foamMergeCase $path/pitzDailySteady || exit

# Run the source case
(
    cd pitzDailySteady
    runApplication blockMesh -dict $FOAM_TUTORIALS/resources/blockMesh/pitzDaily
    runApplication foamRun -noFunctionObjects
)

# Mesh
./Allmesh

# Map from the source case into this case and run
runApplication mapFieldsPar pitzDailySteady -consistent -sourceTime latestTime
runApplication foamRun -noFunctionObjects

#------------------------------------------------------------------------------
